Carbon


OpenWD

Header: Files.h Carbon status: Unsupported

Creates a working directory.

OSErr OpenWD (
    SInt16 vRefNum, 
    SInt32 dirID, 
    SInt32 procID, 
    SInt16 *wdRefNum
);
vRefNum

A volume reference number, a working directory reference number, or 0 for the default volume.

dirID

A directory ID.

procID

A working directory user identifier. You should use your application’s signature as the user identifier.

wdRefNum

On exit, a pointer to the working directory reference number. This working directory reference number can be used in subsequent File Manager calls.

function result

A result code.

DISCUSSION

If a working directory having the specified user identifier already exists for the specified directory, no new working directory is opened; instead, the existing working directory reference number is returned in wdRefNum. If the specified directory already has a working directory with a different user identifier, a new working directory reference number is returned.

If the directory specified by the dirID parameter is the volume’s root directory, no working directory is created; instead, the volume reference number is returned in the wdRefNum parameter.

AVAILABILITY

Not supported in Carbon. Not available in Carbon.

CARBON NOTES

Working directories not supported. Use file system specification (FSSpec) records instead.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)